<?php

class Vacl extends Zend_Db_Table
{
    protected $_name = 'hermes_acl_vue';
    protected $_primary = array('profil','controleur','action');

    public function findroles($app)
    {
    	$select = $this->select();
    	$select->from($this,array('profil'))
    		   ->group('PRF');

    	return $this->fetchall($select);
    }
    
    public function findresources($app)
    {
    	$select = $this->select();
    	$select->from($this,array('controleur'))
    		   ->group('controleur')
    		   ->order('controleur');
    	return $this->fetchall($select);	
    }
    
    public function findprivileges($app)
    {
    	$select = $this->select();
    	$select->from($this,array('profil','controleur','action'))
    		   ->order(array('profil','controleur','action'));
    	return $this->fetchall($select);
    }
}

?>
